package com.wyl.base.bean

import androidx.databinding.BaseObservable
import androidx.databinding.Bindable
import com.google.gson.annotations.SerializedName
import com.wyl.base.BR
import java.io.Serializable

class MsgData : BaseObservable(), Serializable {
    @SerializedName("id")
    var id: String = ""
    @SerializedName("title")
    var title: String = ""
    @SerializedName("content", alternate = ["goldcoin"])
    var content: String = ""
    @SerializedName("createDate")
    var createDate: String = ""
    @Bindable
    @SerializedName("status")
    var status: Int = 1
        set(value) {
            if (field != value) {
                field = value
                notifyPropertyChanged(BR.status)
            }
        }

    fun isNotRead(status: Int): Boolean = status == 1
}